feat(app): add command palette project close action#17018
Open
anduimagui wants to merge 6 commits intoanomalyco:devfrom
Open
feat(app): add command palette project close action#17018anduimagui wants to merge 6 commits intoanomalyco:devfrom
anduimagui wants to merge 6 commits intoanomalyco:devfrom
Conversation
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #17021
Type of change
What does this PR do?
This adds a
project.closecommand to the layout command registry and wires it into the existing project-close flow. The command only shows as enabled when a project is open, and the palette row now uses a generic description instead of the active worktree path.Closing a project from either the command palette or the sidebar menu now always shows the same confirmation dialog before closing. When there are active sessions, the dialog also shows the current session count.
I also added the new
project.closecopy to the existing app locale files so the palette action and confirmation dialog render correctly in every supported language.The shared close-project logic and dialog were refactored out of
layout.tsxintopackages/app/src/pages/layout/project-close.tsx, with focused coverage inpackages/app/src/pages/layout/project-close.test.ts.Questions
How did you verify your code works?
GitHub Actions passed
typecheck,unit (linux), andunit (windows)on this PR.Locally in this environment I ran:
bun run typecheckinpackages/appbun test --preload ./happydom.ts ./src/pages/layout/project-close.test.tsinpackages/appbun run typecheckinpackages/opencodebun turbo typecheckScreenshots / recordings
Not included. This updates command-palette and sidebar close flows and reuses the same close behavior after confirmation.
Checklist